<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        html{
            scroll-behavior: smooth;
        }

        .item {
            height: 500px;
            border: solid 1px;
        }
    </style>
</head>
<body>
<a href="#id1">id1</a>
<a href="#id2">id2</a>
<a href="#id3">id3</a>
<a href="#id4">id4</a>
<div id="id1" class="item item1">1</div>
<div id="id2" class="item item2">2</div>
<div id="id3" class="item item3">3</div>
<div id="id4" class="item item4">4</div>
</body>
</html>
